<template>
  <div>
    <el-dialog
      v-model="dialogVisible"
      width="80%"
      align-center
      :show-close="false"
      :before-close="handleClose"
      draggable
    >
      <template #header="{ close }">
        <div class="dialog-header flex justify-between items-center">
          <div>项目审核</div>
          <el-icon class="el-icon--left cursor-pointer" @click="close"
            ><CircleCloseFilled color="#fff"
          /></el-icon>
        </div>
      </template>
      <!-- 基本信息 -->
      <div class="bg-white mt-[10px]">
        <BaseHead style="border-bottom: 0">基本信息</BaseHead>
        <BaseTable>
          <tr>
            <td class="td-name">批准号</td>
            <td colspan="3">测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目名称</td>
            <td>测试1</td>
            <td class="td-name">项目编号</td>
            <td>审核通过后生成</td>
          </tr>
          <tr>
            <td class="td-name">负责人</td>
            <td>测试1</td>
            <td class="td-name">负责人类型</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">所属单位</td>
            <td>测试1</td>
            <td class="td-name">项目分类</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目级别</td>
            <td>测试1</td>
            <td class="td-name">项目来源单位</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目状态</td>
            <td>测试1</td>
            <td class="td-name">立项日期</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">开始日期</td>
            <td>测试1</td>
            <td class="td-name">计划结项日期</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">结项日期</td>
            <td>测试1</td>
            <td class="td-name">项目总经费</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">拨款金额</td>
            <td>测试1</td>
            <td class="td-name">学校资助经费</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">外拨经费</td>
            <td>测试1</td>
            <td class="td-name">成果形式</td>
            <td>测试1</td>
          </tr>
        </BaseTable>

          <BaseTable>
          <tr>
            <td class="td-name">批准号</td>
            <td colspan="3">测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目名称</td>
            <td>测试1</td>
            <td class="td-name">项目编号</td>
            <td>审核通过后生成</td>
          </tr>
          <tr>
            <td class="td-name">负责人</td>
            <td>测试1</td>
            <td class="td-name">负责人类型</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">所属单位</td>
            <td>测试1</td>
            <td class="td-name">项目分类</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目级别</td>
            <td>测试1</td>
            <td class="td-name">项目来源单位</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">项目状态</td>
            <td>测试1</td>
            <td class="td-name">立项日期</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">开始日期</td>
            <td>测试1</td>
            <td class="td-name">计划结项日期</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">结项日期</td>
            <td>测试1</td>
            <td class="td-name">项目总经费</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">拨款金额</td>
            <td>测试1</td>
            <td class="td-name">学校资助经费</td>
            <td>测试1</td>
          </tr>
          <tr>
            <td class="td-name">外拨经费</td>
            <td>测试1</td>
            <td class="td-name">成果形式</td>
            <td>测试1</td>
          </tr>
        </BaseTable>
      </div>
   



      <template #footer>
        <div class="dialog-footer" >
              <Checkcomponents   v-if="row.processInstanceId" :procInsId="row.processInstanceId"  @success="authorSuccess" :isView="true"  />
             <!-- <div class="operate-btns">
            <el-button type="primary" @click="handleStash">暂存</el-button>
            <el-button type="primary" @click="handleSubmit">提交</el-button>
               <el-button type="primary" @click="handleSaveAndAuth">保存并通过</el-button>
            <el-button type="primary" @click="dialogVisible = false">关闭</el-button>
          </div> -->
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
import BaseHead from "@/views/project/components/BaseHead.vue";
import BaseTable from "@/views/project/components/BaseTable.vue";
import Checkcomponents from "@/views/flowable/processInstance/detail/components.vue"
const dialogVisible = defineModel();
const props = defineProps({
  row: {
    type: Array,
    default: [],
  },

});
const tableData = ref([
  {
    name: "测试",
    date: "2025-01-22",
    address: "测试",
  },
  {
    name: "测试",
    date: "2025-01-22",
    address: "测试",
  },
  {
    name: "测试",
    date: "2025-01-22",
    address: "测试",
  },
]);
const checkForm = ref({
  number: "",
});
function handleSubmit(){
  
}

function authorSuccess(params) {
   console.log("调用自己的业务逻辑，比如关闭弹窗，刷新列表")
}
</script>

<style scoped lang="scss">
@import url("@/views/project/index.scss");
:deep(.el-dialog__body) {
  padding-bottom: 150px;
}
.check-text {
  color: #409eff;
  font-size: 14px;
}
</style>
